<?php
	require_once(dirname(__FILE__)."/include/blog_add_data.php");
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh" xml:lang="zh">
<head>
	<title>添加文章</title>
	
	<script type="text/javascript" src="./xheditor/jquery/jquery-1.4.4.min.js"></script>
	<script type="text/javascript" src="./xheditor/xheditor-1.2.1.min.js"></script>
	<script type="text/javascript" src="./xheditor/xheditor_init.js"></script>
	<script type="text/javascript" src="./xheditor/xheditor_lang/zh-cn.js"></script>
	<script type="text/javascript" src="./xheditor/xheditor_plugins/ubb.js"></script>
	<script type="text/javascript" src="./js/utility.js"></script>
	<script type="text/javascript">
		$(document).ready(function(){
			pageInit("");
		});
	</script>
	<link rel="stylesheet" type="text/css" href="css/common.css" />
	<style>
		.subtitle{
				margin: 0px 0px 0px 0px;
				padding: 10px 0px 10px 0px;
				font-weight: blod;
				font-size: 12px;
				color: #999999;	
			}
		.title{
			padding: 10px 10px 10px 10px;
			font-weight: blod;
			font-size: 30px;
			color:#ff0000;
		}
		.submit_btn{
			color: white;
			cursor:pointer;
			font-weight: bold;
			margin: 0px 0px 0px 0px;
			padding: 0px 0px 0px 0px;
			background-color:#6B86B3; 
			height:30px; width: 70px
		}
	</style>
</head>
<body>
	<table align="center" style="width:<?php echo $width;?>" border="0">
		<tr>
			<td><?php require_once("./header.php"); ?></td>
		</tr>
		<tr>
			<td id="content">
				<form action="#" method="post">
				<table align="center" style="width:95%; padding:30px 0px 0px 20px;background-color:#ffffff;" border="0">
					<tr>
						<td style="padding-bottom: 10px">
							<div style="font-size:18px;color:black;padding:8px 0px 10px 10px;height:30px; border-bottom:solid 1px #dddddd; ">
								<div style="float:left"><img src="./skins/blog_logo.gif" atl="logo" /></div>
								<div style="float:left;padding-top:5px;padding-left:5px"><a href="./blog_home.php">
									算法解题</a><span style="font-size:12px"> > </span>添加文章
								</div>
							</div>
						</td>
					</tr>
					<tr>
						<td>
							<div style="padding-left: 0px">
								<p class="subtitle">文章标题</p>
								<input type="text" name="title" value="" required = "required" style="width:600px"/>
								<span style="color:red;font-size:12px">*[标题最长100字]</span>
							</div>
						</td>
					</tr>
					<tr>
						<td>
							<div style="padding-left: 0px">
								<p class="subtitle">文章关键字</p>
								<input type="text" name="keyword" value="" required = "required" style="width:600px"/>
								<div style="padding-top:10px">
									<span style="color:red; font-size:12px">*[关键字用于同一个题的归并，请务必认真填写， 推荐使用oj_pid或oj_cid_pid, 如果有多个关键字用|符隔开， 如hdu_1000|hdu_1001， 最大100字]</span>
								</div>
							</div>
						</td>
					</tr>
					<tr>
						<td id = "content">
							<div style="padding-left: 0px">
								<p class="subtitle">文章内容</p>
								<textarea id="editor" name="editor">
								</textarea>
							</div>
						</td>
					</tr>
					<tr>
						<td>
							<p class="subtitle">算法类型</p>
							<div>
								<?php 
									foreach($PageArray["algo_classlist"] as $Object){
								?>
									<li style="list-style:none; float:left"><input type="checkbox" name = "<?php echo $Object->id; ?>"/><?php echo $Object->name; ?></li>
								<?php 
									}
								?>
							</div>
						</td>
					</tr>
					<tr>
						<td style="padding-top: 30px">
							<input type="submit" name="blog_add" value="提交" class="submit_btn" />
						</td>
					</tr>
				</table>
				</form>
			</td>
		</tr>
		<tr>
			<td style="padding-top:50px"><?php require_once("./footer.php"); ?></td>
		</tr>
</body>
</html>